VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "CSort"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit

Public NumericSort As Boolean
Public Function IMSort_CompareColumns(item1 As String, item2 As String, col As Integer) As Integer
   '
   ' Compare items either as integer or string
   '
   If (NumericSort = True) Then
      IMSort_CompareColumns = CInt(item1) - CInt(item2)
   Else
      If (item1 < item2) Then
         IMSort_CompareColumns = -1
      ElseIf (item1 > item2) Then
         IMSort_CompareColumns = 1
      Else
         IMSort_CompareColumns = 0
      End If
   End If
End Function

